<?php
/**
 * +----------------------------------------------------------------------
 * | 九月科技-ztuc.cn
 * +----------------------------------------------------------------------
 *                      .::::.
 *                    .::::::::.            | AUTHOR: siyu
 *                    :::::::::::           | EMAIL: ztucke@ztuc.cn
 *                 ..:::::::::::'           | DATETIME: 2020/01/31
 *             '::::::::::::'
 *                .::::::::::
 *           '::::::::::::::..
 *                ..::::::::::::.
 *              ``::::::::::::::::
 *               ::::``:::::::::'        .:::.
 *              ::::'   ':::::'       .::::::::.
 *            .::::'      ::::     .:::::::'::::.
 *           .:::'       :::::  .:::::::::' ':::::.
 *          .::'        :::::.:::::::::'      ':::::.
 *         .::'         ::::::::::::::'         ``::::.
 *     ...:::           ::::::::::::'              ``::.
 *   ```` ':.          ':::::::::'                  ::::..
 *                      '.:::::'                    ':'````..
 * +----------------------------------------------------------------------
 */
/**
 * Created by PhpStorm.
 * Keyword: Administrator
 * Date: 2020/3/14
 * Time: 17:18
 */
namespace app\store\model;
use think\model\concern\SoftDelete;

use app\store\model\core\InitModel;

/**
 * 敏感词
 * Class Keyword
 * @package app\model\admin
 */
class Keyword extends InitModel
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;
    // 定义表
    protected $name = 'keyword';

    // 第一自动写入时间字段
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';

    const TYPE_WORD = 1; //通用

    // 可用字段
    protected static $available = [
        'id',
        'word',
        'type',
        'create_time',
        'update_time',
        'status',
    ];   

    //数据
    public static function keyWordCheck()
    {
        
        return self::where(['status' => 1])->field('word')->select();
     
    }
}